<!--
 * @Author: error: git config user.name && git config user.email & please set dead value or install git
 * @Date: 2022-12-28 15:09:38
 * @LastEditors: error: git config user.name && git config user.email & please set dead value or install git
 * @LastEditTime: 2022-12-28 18:02:47
 * @FilePath: \html学习\vue-test\vue-history\src\components\ListPage.vue
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<template>
    <h1>列表</h1>
    <div v-for="n in 10" :key="n">
        <RouterLink :to="`/detail/${n}`">
            ID:{{ n }}
        </RouterLink>
        <br>
        <span @click="jump(n)">id: {{ n }}</span>
    </div>
</template>
<script>
export default {
    methods: {
        jump(n) {
            this.$router.push(`./detail/${n}`)
        }
    },
}
</script>